x86/HVM: simplify do_hvm_op()
authorJan Beulich <jbeulich@suse.com>
Fri, 28 Mar 2014 12:30:10 +0000 (13:30 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 28 Mar 2014 12:30:10 +0000 (13:30 +0100)
commit8d134c2e12730a4a3dce9873f4671f6dd8860baf
tree5ff27cfc0365fdd1cf1bcf2d53a2e52ff3e719a5
parent9011c2615c18b92f10cda8d78622e0c2a9e1f846
x86/HVM: simplify do_hvm_op()

- boundary checks in HVMOP_modified_memory, HVMOP_set_mem_type, and
  HVMOP_set_mem_access: all of these already check for overflow, so
  there's no need to range check the first _and_ last PFN (checking
  the last one suffices)
- copying back interface structures that were previously copied from
  guest memory can use __copy_to_...(), since copy_from_...() already
  did the address range validation

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/hvm.c